//token存、取、删封装
const ACTIONMENUONE:string = 'active-menu-one'
const ACTIONMENUTWO:string = 'active-menu-two'
export function setMenu(menu:string,grade:number=1):void {
    if(grade===2){
        sessionStorage.setItem(ACTIONMENUTWO,menu)
        return
    }
    sessionStorage.setItem(ACTIONMENUONE,menu)

}

export function getMenu(grade:number=1):string|null {
    if(grade===2){
        return sessionStorage.getItem(ACTIONMENUTWO)
    }
    return sessionStorage.getItem(ACTIONMENUONE)
}

export function delMenu(grade:number=1):void {
    if(grade===2){
        sessionStorage.removeItem(ACTIONMENUTWO)
        return
    }
    sessionStorage.removeItem(ACTIONMENUONE)
}